#include "log/AsyncLog.h"
#include "log/Logger.h"
#include <chrono>
#include <thread>
#include <string>



constexpr std::size_t ROLL_SIZE = 1 << 22;
int main() {
    Logger::SET_LEVEL(Logger::INFO);
    AsyncLog log{ROLL_SIZE, "test"};
    log.start();
    
    using namespace std::chrono_literals;

    int count = 0;
    while (true)
    {
        auto line = std::to_string(count++) + " this is a log line\n ";
        log.append(line.c_str(), line.size());
        std::this_thread::sleep_for(123ms);
    }

}